//
//  CYAnimation.m
//  Edu_iOS
//
//  Created by yanyan on 2017/9/12.
//  Copyright © 2017年 yanyan. All rights reserved.
//

#import "CYAnimation.h"

@implementation CYAnimation
+(CAAnimation *)cubeAnimationDuration:(CGFloat)duration subType:(NSString *)subType;
{
   /** 
    常見的转换类型（type）：
    kCATransitionFade               //淡出
    kCATransitionMoveIn          //覆盖原图
    kCATransitionPush               //推出
    kCATransitionReveal          //底部显出来
SubType:
    kCATransitionFromRight
    kCATransitionFromLeft    // 默认值
    kCATransitionFromTop
    kCATransitionFromBottom
    
    设置其他动画类型的方法(type):
    pageCurl   向上翻一页
    pageUnCurl 向下翻一页
    rippleEffect 滴水效果
    suckEffect 收缩效果，如一块布被抽走
    cube 立方体效果
    oglFlip 上下翻转效果
    */
    CATransition *animation = [CATransition animation];
    animation.type = @"cube";
    animation.subtype = subType;//kCATransitionFromRight;
    animation.duration = duration;
    return animation;
}
@end
